generateDocs.sh: Simplify

* Make more like mediawiki-core's mwjsduckgen.
  - Use bash set -e to have the script abort early when any
    part of it fails (especially the jsduck command).
  - Since it will abort early, we don't need to save the exitcode
    in a variable and return it again.
  - Don't "cd" into anything from the script, simply pass jsduck
    absolute paths instead.

Change-Id: I4bb25e004cac63b81428431b57513655f671376e