Big refactoring with tests in mind.

* printed errors are going on stderr
* using format() instead of '%' as recommended
* subprocess.Popen instead of os.system
* factoring stuff out (to ease the tests)
* using file mock to test prepare-commit-msg
* some utf-8 for people with non ASCII names
* six is not required anymore

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>