The umask is taking an octal number, and IMHO it should accept any legal octal number that fits in the expected range of values. I do not understand at all why the parsing code isn't just calling Integer.parseInt to parse the octal number and extract each three-bit value from that. The regexp seems like a very heavy-handed and error-prone way to do it, but I don't know if we need to rewrite the parsing from the ground up just to fix this particular error.
Patch looks OK overall. Could you add some tests for invalid permissions as well? e.g.: 1222 and 01222 are not supposed to be valid.