Call mkpathdup() rather than xstrdup(mkpath(...))