Reverting failed attempt at a python3 compatible StringIO