Py2&3 port

Initial port is done. Tests are passing against 2.7 and 3.3 using six for all incompatibilities.
No idea. Will fix.