Fix #982 by using the effective user id on unix systems instead of depen...

...ding on

getpass.getuser(). This is required because on some systems 'LOGNAME'
is not updated by sudo.
Signed-off-by: david <db@d1b.org>