Modified dependencies script to better handle partially succeeded installations