hooks: Ignore BrokenPipeError exception

It happens for example in github.sh during push to a repository
outside packages, as the script leaves early without consuming all
its input. As such it is harmless and can be safely ignored.
hooks: Print the type of caught exception