add unit tests and fix lexical indentation for python3

These are the pep8 tests that break python3,
such as mixing tabs and spaces for indentation.

I ignored all the pep8 tests that seemed only stylistic,
such as "visual" indentation.

http://docs.python.org/3.3/reference/lexical_analysis.html
exceptions are now compatible with both python 2.5 and 3.3

The syntax for capturing exceptions changed in python 3, but
we need to continue supporting python 2.5 syntax since many
people use tito on RHEL 5, which has python 2.5.

http://docs.python.org/dev/howto/pyporting.html#capturing-the-currently-raised-exception