System: bypass MacOSX `mkdir` bug

The bug is described in this issue for core:
https://github.com/janestreet/core/issues/7