replaced cwd= by cd() in DeploymentScript
cli.deploy: better handling of errors on bad URLs or unreachable server