Handle broken pipe in check_files()

This way partial output (e.g. "pep8 . | head") doesn't get clobbered with a
stacktrace on stderr.