TemplateManager: fixes #13 and fixes #4, installing template from dir and zip.