Fix DirName and BaseName