Validate known hosts file in config, and fix an error with Mappingcollection.replace()