Fix NullPointerException when retrieving resource paths

Fixing NPE when retrieving resource paths in the case where your project doesn't contain /templates/shared or /WEB-INF/templates/shared folders