merge: fix a bug detecting directory moves
When all the files in a directory are moved, it may be incorrectly marked as moved even if it contains subdirectories.
abort: error: Connection refused255copy: No such file or directoryabort: HTTP Error 4040