Redmine#3839: hash input files to ensure no duplicates are loaded

As described in https://cfengine.com/dev/issues/3839

Includes acceptance test changes that require hash-based detection.