(#9491) Preserve trailing slashes in FileSettings
We use the trailing slash in a FileSetting to determine whether it's a
directory. The change in 97c043f4 caused trailing slashes to be stripped.
This caused errors like:
change from directory to file failed: Could not set 'file on ensure: Is a directory - /var/lib/puppet/facts