L::Util: Avoid "garbage-in, garbage-out" in perm2oct

Have perm2oct check the input string looks like a valid permission
string and invoke croak when it does not.

Signed-off-by: Niels Thykier <niels@thykier.net>