Non-zero exit terminates and fix deploy.py name

Now non-zero exit code terminates the entire
script, and some deploy.sh in code are changed
into deploy.py. Also, mkdir now adds -p to ignore
already existing directories.