Replace custom ensurePath method with mkdirp module