[NEWSPLT-106] Fix templates when usePortalJsLibs = true.  Bonus: easier templating.
Merge pull request #19 from jhelmer-unicon/NEWSPLT-106_template_bug

[NEWSPLT-106] Fix templates when usePortalJsLibs = true.  Bonus: easier ...