Directory sync now correctly stamps directories as directories and avoids mistaking files for the null device
The helper that stamps files for directory sync now explicitly detects when a path is actually a directory, and records it as directory instead of falling through to file-hashing logic meant for regular files. It also guards against a target being indistinguishable from the system's null device, and the warning message shown when stamping fails now mentions this case explicitly.
This avoids directory sync mishandling directories as if they were regular files, and gives a clearer warning when a file genuinely can't be read or identified.