Make std.file.ensureDirExists safe

It contains the following unsafe operations but we can verify that they can be trusted.

On Windows systems:
  - use of unsafe functions `core.sys.windows.windows.CreateDirectoryW` and `std.internal.cstring.tempCStringW`

On Posix systems:
  - use of unsafe functions `core.sys.posix.sys.stat.mkdir` and `std.internal.cstring.tempCString`

Additionally, I replaced `cenforce` with `wenforce` on Windows systems.