Add a whole bunch of py3 compatibility with six and fix unicode __repr__ in python2