Add test for raising repaired class when existing file is templated

Ref: Redmine:4611 (https://cfengine.com/dev/issues/4611)