Expose StringIO object within module correctly