Use io rather than StringIO module.

The former works in Python 3 too.
Use new-style print function.
Get PMI and RMF with Python 3 fixes.
Fix 'unclosed file' warning.
Get latest RMF.
Fixes to work with Python 3.
Use new-style print function.
Use new-style print function.
Use new-style integer division.
Use new-style print function.
Python 3 fixes.
Add exceptions for Python 3 unittest module.
Add exceptions for OptionParser base class.
More Python 3 fixes.