Fix template module incorrectly handling mode when dest is a directory

Fixes #9350
Update the modules to pull in the files module needed for the updated
integration tests