Python 3

An update to add support for Python 3, consisting mostly of
* Unicode literals
* BytesIO
* Ensuring the encoding when dealing with incoming data (defaulting to UTF-8)

Also a couple of tweaks to get the tests working with Python 3, and behaving consistently.
Why couldn't this be a decorator? I kinda prefer decorators because you get less indentation going on.