Adds verification of whitelisted files and directories.

Without these checks a whitelisted file entry which happens to point to a source directory will be happily copied as a destination file, and missing directories will be created on destination.