More work for run-once.sh.  Also made update-and-deploy.sh create the output directory if it doesn't exist.