Attempt to make test using stringIO to work on all python versions.