fixing StringIO import by six.moves.cStringIO replacement