Properly handle StringIO

- Ran into this when transitioning to Artifice