Better way of checking for group permissions.

Commit message explains the reasoning itself. Before we merge this in I'd like to have some feedback on the way I'm currently testing this as well as how to test this properly for the `_real?` family of methods as well as `writable?`, etc.

One problem I foresee with this testing setup is that the tests will break if the user has only 1 group as `(Process.groups - [Process.egid]).sample.to_i` would return `0`, though I'm not entirely sure how `File.chown` behaves in that case.