Fix handling of dstdir with expandable parts