Add group_get_perms to model/group, added valgrind test to scripts/test.pl