One more try: Python 3 support

Sigh, I'm new to this pull request thing. To Python 2/3 compatibility as well. This patch does seem to do the trick.

Peace