Fixes for Python 3
Merge pull request #41 from cdeil/py3-fixes

Fixes for Python 3