Fixing cwd for bash scripts