fixes to injectTemplates grunt task