Python 3 changes

These small changes allow django-cpserver to run on Python 3 (tested with 3.3.2). Changes should be backwards compatible with the most recent releases of Python 2.6.