misc/git-hooks/pre-receive: print failure to stderr
misc/git-hooks/pre-receive: fix pep8 warnings
misc/git-hooks/pre-receive: restore previous behavior

print appends a \n to the end of string, sys.stderr.write does not.
misc/git-hooks/pre-receive: add generic exception handling

This is what exceptions forces us to do. And people believe they're that
good...

Fix #306.