added an error if template name doesn't end in web, rnw tex or doc