Rewrote drop root privleges to be  a lot simpler.

Uses the same implementation as tcpdump.