Call setuid()/setgid() after parsing arguments

refs #7375