fix: incorrect usage of `fs.mkdir` which does not return a promise
fix: incorrect usage of `fs.mkdir` which does not return a promise

Need to use `fs.promises.mkdir` instead. Also switched this to
a little more readable part.

angular/dgeni-packages,angular/dgeni-packages,angular/dgeni-packages