Fix for Python3 compatibility.

Ran tests for both python2 and python3. All 23 tests passed successfully.

Thanks for the package.