Use umask for mkdir too in lib/Twig/Environment.php

Should writeCacheFile respect umask settings on mkdir similar as chmod?

On reviewing a Drupal permissions problem I checked twig implementation. Is doesn't seem right to omit the umask for mkdir.

Or am I missing something?