Use excludeFilter when generating template files

This ignores editor backup files and the like. Intended
to fix #1884.

Added a hidden file to one of the scripted tests, so this
test now fails without using excludeFilters.