path: Avoid copying in mkdirP.