More robust install.sh script