actions: refactor parse_octal_mode_args(), to use it with the perm test function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
action: add octal mode support to perm test function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>