Redmine#3573: test messages when using a template on a missing target file

As requested in https://github.com/markburgess/core/commit/44bf3f5e8ebb7bad0466183abdffc520e2d3fed8#commitcomment-4977602 for https://cfengine.com/dev/issues/3573