Working run_swig.sh script.
Minor refactor.