Python 3 fixes
Merge pull request #22 from extesy/patch-1

Python 3 fixes