A possible bug in the use of mkdir? Works on Windows but crashes on Unix