Update groupNames.py

Same as with userNames.py (e31d0cd):

1) 'has_key()' has been removed in Python 3.x
2) This works if we use the grent.* values instead of grp and gid