fix mkdir bug

https://bugs.php.net/bug.php?id=62871&thanks=6