Changed Getgid/egid to functions
Added test case # 18