Python 3 Update

Was porting a project to Python 3 today and ran into some issues with this library. It just required a few tweaks to get things up to speed with Python 3.