Allow for opening a StringIO instance rather than a filename