fixed a corner case when adding an empty path to a dir path