fix 'as' syntax for exceptions - incompatible with python<=2.5
the json module is not available in versions of python older than 2.6, simplejson should be used in versions less than python 2.6
store the requirements in a requirements.txt file so they can be more easily installed using pip on travis
use unittest2 instead of plain unittest so that the tests run the same in Python2.4, Python2.5, and Python2.6 as they do in Python2.7