Add test to ensure mkdir with permissions works as expected.

Relies on process umask being set to 0022.  If this is not the case, this test
will break.