Python 3 text conversion issues

Fixes for issues hit when running pdf2txt.py on [U2600.pdf](http://www.unicode.org/charts/PDF/U2600.pdf) with python3.