make the bash scripts more resilient to symlinks