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.
From the presence of the `six` import I read implied pre-2.6 compatibility. If that is not needed then I can change this to be just `from io import BytesIO`. But as it is it has this effect on 2.6+.