Changing the directory in scripts