Add python version check to main script

Exits without doing anything if the python version is too old. Does not attempt
to print yet because error printing gets confusing between py2.3 and 3.5. Will
come back to fix this later.
Convert all unit test with statements to be nested

Python 2.6 does not support multi-clause 'with' statements, so all of these
needed to be converted to nested with statements. Created some trouble with
keeping things within 80 chars for PEP8 compliance.