Replace StringIO imports with six.moves.