Now a file is only output to the xml file once (even if it's shared by multiple stylesheets, or templates).  As well, stylesheets are only exported once.

Improved permissions model. You now need the "Modify Templates", and the "Add Templates", "Add Stylesheets" permissions, etc. to import a theme.

Also added a dtd version number to ensure forward compatibility, and security (so you don't accidentally try to import a module xml file as a theme, etc), this means that older themes are not compatible with v1.0.4 and beyond of theme manager, you will have to re-export the theme.