allow symlinking to shell scripts

patch for SPARK-3482
You may have to quote these - so that dirs with spaces within their name work. Like they do at the moment.
Above should look like.
```FWDIR="$(cd "$(dirname "$(readlink -f "$0")")"/..; pwd)"```