Fix python3 support.
Merge pull request #105 from pazur/py3fix

Fix python3 support.