Wrap StringIO so CLI export works in non-UTF8 bash environments (Fix for Issue #94)