installer: fix bugs introduced by cf99991c
installer: fix bugs introduced by cf99991c

install.sh:
- Separate out command line option validation from parsing.
- The loop to input and validate the install root directory needed
  various fixes to cope properly with non-interactive operation and
  the new -D (package destdir prefix) option.

modernish/modernish