Added TemplateWritingHandlerTemplateFactory. refs #418