Add mode property

... and disallow numeric mode parameters (only 'r', 'w' and 'rw' are allowed)
Prefix masks in module namespace with _