* Added `set -u' and `set -e' to make the script more robust.
* with those options set, identified and fixed some problems regarding
  unitialized variables and erronous return values caused by
  terminating procedures with the test `[[ ! -z "${DEBUG}" ]] && debug
  ...` which return false if DEBUG isn't set.