Py3: Finish the python3 port

- Use six.StringIO instead of StringIO [1].
- Use six.int2byte instead of chr [1].
[1] https://pythonhosted.org/six/

Change-Id: I28d9ce6a435af1f9213c50569d2addf89c722ae3
Closes-bug: #1709546
2 files changed