Add back `test_user_if_present_with_gid`.

Some systems have the nobody user with the nogroup instead of nobody as it's group.
The passed `gid` can be the group name, covert it to `gid` before comparing.