Faster version of StringIO

https://docs.python.org/2/library/stringio.html#module-cStringIO