Fix template_subst sample script

* Fixed error when no namespace is included in template name