Fixed bash scripts to ensure that they are run within appropriate directories.