fix helpers.mkdirp on windows

`path.dirname` do things better than split-slice-join the path assuming `/` is directory seperator, may also easier to read