Updated for Python 3.3.3

The script required a few changes to work with the newest python release. Mostly its conversions between bytes and strings.

I'm new to python (and github) but I hope this is of use.