Removed needless setres[gu]id to allow --setuid to work with Python 2.7.

Please refer to the OS syscall documentation: when used by root, set[gu]id
does exactly the same thing that the more verbose setres[gu]id was thought
necessary for.  It wasn't.
Allow mixed case in user/group names
Use split to parse user/group ID
Minor cleanup
Made Python code PEP8 clean