Fix broken logic branch involving existing directories.