List available groups if -g isn't specified or an invalid group is given.

This commit adds the funtionality to list the available groups if you leave out
the groups option, leave it blank, or give an invalid group.

This also cleans up some code associated with forcing -g to be a required option