Made dependencies.sh more resilient.