Various Python 3 fixes

Test results now failures=4, errors=10
Down from        failures=5, errors=68

Not counting testLineSentenceWorksWithCompressedFile from word2vec
tests, which ends up in what seems to be an infinite loop.