Fixing issues 5508 and 5512. Making sure profile dir path of type str under both Py2 and Py3. Changing the way BytesIO imported so that str unicode swap actually happens under Py2.
Updating the unicode preference setting test