add check_gid for Solaris

I've added check_gid for Solaris.

"grep -w ^#{group}", 
Solaris's grep does not treat "^#{group}" as "^" and a word "#{group}", 
treat as a word "^#{group}".