Fix detection of setuid / setgid stuff
Make subsequent runs faster