Added a check in clone_dir() so we don't hash directories, which seems not to work. Also added to see if we even want to hash.