Merge pull request #231 from berkerpeksag/simplfy-oserror

Simplify error handling in mkdir_p()