Restored Python 3 compatibility.
Merge pull request #254 from filmor/patch-1

Restored Python 3 compatibility.