removing the need for the six module while keeping Py2/3 compatibility

I noticed that there is relatively little use of the six module in the project, and these minor changes remove the need altogether.
The `io` module works on Python 2.6+ and 3.0+ and has `BytesIO` on both. Why not just use that instead of incorrectly using StringIO?