Use the correct directory permissions when making directories
This fixes and issue where we were not passing file permissions down during directory creation. While tests fail for this, our CI apparently doesn't respect file permissions and so it did not fail as expected.