Fixes Python34 bugs

This fix is needed due to the different encodings on Python27 and
Python34. Some tests failed and some string values were not
compatible.