Replace mkdir with mkdirp

In response to #326