Fix bug when directory leading to file had same name as that file

Using comparison to check if we have file or directory was really
really bad idea.
2 jobs for collisions-filedirname-fix
in 10 minutes and 46 seconds and was queued for 2 seconds