Use six.StringIO instead of io.StringIO

Apparently io.StringIO changed the API from 2.6 to 2.7