Fix CLI of :mod:`cProfile` and :mod:`profile` to catch :exc:`BrokenPipeError`.