Use StringIO from Python 2/3  compat. wrapper.