Move subprocess handling from run-local.py to run-local.sh