in reply to 'ls' with octal permissions

I just wrote a simular but far less elegent version of this yesterday because I didn't find this first.

However when I tested this against my test cases I did find some edge cases where it fails.

This file:
-rwS--S--- 2 will will 0 Jun 5 11:37 foo.bar
Should be mode 6600, but this code returns 0600.
This one:
-rwS--S--T 1 will will 0 Jun 5 11:37 foo.7600
Should be 7600, but this code returns 1600

I'm not sure I've every seen files with these permissions in the wild, but still..

Nice code though.