Wrap the entirety of the install_salt and configure_salt shell scripts in a function to prevent problems if interrupted mid-download, as preparation to update the installation guide in the wiki to use these scripts via curl| sudo sh. Also make scripts portable and do a bit of cleanup.