Bug 1146750 - Ensure permissions on temporary directories

* fix code format