Add start of Python 3 compatibility. Closes #3. [Scott Maxwell]