Convert gid and uid to int

So that comparison with stat works.