Modifications for python3 support.

This creates a subdirectory under which the code can be converted to python3 compatible with 2to3.

It also makes several changes to the existing code base -- some substantial -- mostly to ensure that strings are in the correct format for python3.