Some more adjustments

* Pipe password to sudo via stdin instead of relying on the timeout
before password is prompted again; user might have changed the timeout
from the default.

* Change "~/" to an absolute path
Add root check, add quotes to some variables

* Check if user is root. Set home to null if true.

* Add quotes to variables being compared in if-statements. You can never
be too sure.
Add update process