Finally, Templates are working. There are some clunkiness that will be
handled in later bug fixes but the main usage is available. Templates
can now be saved and restored from a preferences xml file in the editor.
One is created if it does not exist. Fixed a few duplication issues in
the saving system from the last commit.

This, finally, Fixes #50