Correctly handle return of getgrgid_r, check for NULL in gEnt

fixes xrootd/xrootd#51