Improve Python 3 compatibility
Merge pull request #1 from ccampbell/master

Improve Python 3 compatibility