Minor fixes

Use a more reliable check for root user for e.g. servers with "root" renamed away from script kiddies, and report errors in exit code so that they can be easily checked for.