mkdir: improve error handling (closes #121)

This prevents the inappropriate error messages when ```mkdir``` is passed the ```-p``` option.