Added check exists dir

After failed create dir repeatedly need check exists dir, perhaps it was created in another process.

https://bugs.php.net/bug.php?id=35326