install.sh: Fix reinstall bug
restore-previous-power-state: Halt on errors
restore-previous-power-state: POSIX shell compatibility/robustness fixes