Added try/except import statement because python 3 uses io.StringIO instead of StringIO.StringIO; this seems to be the only requirement for python 3 compatibility