path_dwim: fix when basedir not set
Merge pull request #5527 from sergevanginderachter/basedirdwim

path_dwim: fix when basedir not set