Add python 2/3 support.

Adjusts code to accommodate various python 3 changes:

* ``__div__``  to ``__truediv__``
* absolute imports
* generator results (keys, values, items, etc)
* dictionaries no longer sortable