added import io.StringIO for python3. Fixes #36