Python3 unicode/byte string fixes

Tests for Python3 were failing because Python3 unicode strings != Python3 byte
strings.