Extract read_paths.
Extract iterate_files to a separate file.
Import json only if required.
Import filecmp only if required.
Push hash_func calculation down to find_duplicates.
Push down verification down to find_duplicates.
Simplify verification and remove special code 22.