implement setgroups
consistent
Merge pull request #1050 from arlolra/setgroups

Implements setgroups