Support Python3 using 2to3.

Have setup run 2to3 during installation.
Use .decode() to get unicode strings in tests.
Use integer division.
Allow the content type to be passed into the js/javascript script tag.