Harden the scripts against symlinks
By default, shell scripts can fail when executed via symlinked paths as ..
directory references may not work.
This change fixes that and also checks that all the ..
in the scripts directory are correct.
cc @jarv