Fix unicode bug

Interestingly, despite the docs, StringIO will NOT accept non unicode
strings