Sanitize autoupgrade script.

-  Shutdown of running instances as each logged-in user instead of
   script user -- should be root.

-  Fix ugly error messages when calibre isn't installed yet.

-  Exit with error message if run as non-root.