Resolves basexpath dir issues.

Uses a temp dir by default and tries to create it recursively
whenever an operation is run.

New dependency: mkdirp