update-oojs-ui.sh: Replace target dir instead of adding file copies
* A command like "cp dist/* $TARGET_DIR" does not remove files
that were deleted in the release dist. Using rsync instead.
* Use bash -n or -z instead of "" and "x$VAR" == "x" tricks.
* The "git commit <dir>" doesn't properly take care of staging
deletion of files removed by the update script, nor does it
reliably (?) stage new files.
Instead using a combination of "git add -u <dir>" (The -u
stages deletion and modifcation of tracked files), and
"git add <dir>" (stages modification and creation of files in
that directory).
* Use "grunt test" instead of "grunt <default>" to make more
explicit what is going on (no change in behaviour, default=test).
And document why we don't use plain grunt-build without tests.
Change-Id: Id97a66df64d9e43e3c05388486b9f959108363c1