Python 3 Support

Minor changes were needed to enable Python 3 support. Mostly including the ```six``` module and adding py32 to the tox.

There is also one bug fix included in this pull request and converting io.BytesIO to bytearray.