Move bitmask constants into a PERMS namespace per code review feedback from @arturadib.