Fixes #3843 : Handle gid in group management

http://www.rudder-project.org/redmine/issues/3843