Fix a bug while calling test.sh with a global path