Tentative Python 3 support.

Just to show that Python 3 support isn't that complicated. ;-)
I don't know. The line below: `.encode('ascii', errors='ignore')` does however. I just changed the place it did it, to avoid an .encode() (which transforms the string to bytes under Python 3).