Fix check that source path is not a directory.