Make deploy scripts fail on errors

Added flags to bail out on undefined variables and errors