PY3COMPAT: StringIO library reorg
PY3COMPAT: consistent use of relative imports to work with Python 3.3+, which changes import behaviour