Fixed tests when user is the root.

Mocked read permissions in the unit tests.
Name is confusing, this is actually the name of the open function, not the open module.