Allow more liberal matching of template names

This small change allows the template name to match when GET parameters are tacked on the end.

i.e. main.template?version=0.10 is still a .template file