Cleanup of 'addgroup' command (renamed to 'setgroup')

Lots of small details, but functionality is in principle unchanged.