improved 'fetch dependencies' script