Use mkdirp and a bit cleaner error messaging