change directory before executing script