Added TemplateFactoryTemplateWritingHandler. refs #418