Fix docroot

If the example contains a docroot and/or approot, use it instead of the source directory. This fixes the run-example .bat/shell-script for some examples where the docroot/approot was different than the source directory (ticket #1864 in RedMine)

Also, the shell scripts contain no bashism, so relax the bash requirement.