Mkdirp when using -o option

Closes #270