use curl -o to set the directory instead of cd-ing into the directory