Naive implementation of IO.umask