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.
Merge pull request #4060 from s0undt3ch/hotfix/fix-travis-again

Add back `test_user_if_present_with_gid` and fix it