Don't crash when directories are created, renemed or chmodded

BUG: 435161
2 jobs for !71 with fix-435161-trailing-slash in 2 minutes and 7 seconds (queued for 5 seconds)
latest merge request