better error handling in case of missing resource.  This refactoring
notably fixes a notorious NPE at
org.mifosplatform.template.service.TemplateMergeService.compile(TemplateMergeService.java:51)
I kept running into on GET /templates/{id}