Python2and3

Don't feel obligated to merge these changes either, but in addition to trying to feel my way around github, I've been wanting to separate the gui/prefs stuff from the 'engine' for a while. And in my dream world ... the engine (the 'lib' folder) would be its own git project/repository which could then be added to other projects (the gui wrapper, sigil plugins, calibre-plugins, etc) using git-subtree or git-submodule. Adding the __init__.py (and adjusting the relative imports) to the lib folder would be a step toward making the core code a standalone, importable package (without the gui).

Thoughts?