Basic Python 3 compatibility

This is fairly basic stuff, while evaluating static site generators
(most of which run on Python 3, which means most of hyde's dependencies
seem okay), I ran 2to3 on hyde and tweaked enough little things that I
could run hyde gen.

The UserDict change could probably be done with six to be compatible
with both Pythons, and I don't know the intent of _encode_path wrt bytes
and strings so I just made sure it matched what urllib.parse.quote does.