Add uid and gid options for user impersonation
Merge remote-tracking branch 'marsup/set-uid-gid'
refactor uid/gid.
fix wscript for unix.