M: ScriptFile: add function replacing template name to template content.