Python 2.6 compatibility.

These changes should provide Python 2.6 compatibility. I still have two failing tests, but they are failing under 2.7 as well. I'll address those in a later pull request.

With the `unittest2` change, I committed a file called `requirements-dev.txt`. You can run this to install `unittest2` by running `pip install -r requirements-dev.txt`.

I also plan to apply my Python project template in a later pull request. This should make porting to 3.3 much easier. The project template uses `pytest` so I will consider porting the tests to `pytest` when I am working on that PR.