Fixed Python 2->3 string/bytes conversion bug when running tests.