Fix a few errors.
Pull the scripts from the to_do array.
Call all_deps earlier to fill the to_do array.