Fix Python 3 problems
Merge pull request #1 from matze/fix-py3

Fix Python 3 problems