Initial Python 3 compatibility update
Merge pull request #304 from fgimian/python3-compatibility

Python 3 compatibility update