Better username detection
getlogin
wasn't being reliable, so per the manpage:
For most purposes, it is more useful to use the environment variable
LOGNAME to find out who the user is. This is more flexible precisely
because the user can set LOGNAME arbitrarily.