Fixing python3 test failures

I am a little robot, encoding and decoding strings.