Fixed multiple bugs in makedir().  First off, when creating nested folders, it only set permissions properly on the innermost one.  Secondly, it passwd an octal constant to atoi(), which only works on decimal numbers, resulting in directories with no user read or execute permission, making creation of nested dirs fail.
Fixed multiple bugs in makedir().  First off, when creating nested folders, it
only set permissions properly on the innermost one.  Secondly, it passwd an
octal constant to atoi(), which only works on decimal numbers, resulting in
directories with no user read or execute permission, making creation of nested
dirs fail.

Also added a comment wondering why we do special processing when euid != uid.
If no one disagrees with my comments, I'll remove that weird code in the future.

dscho/nmh,mcr/nmh,dscho/nmh,dscho/nmh,mcr/nmh,dscho/nmh