Add download script

This download script is a mess, but it mostly works and should provide
enough output to fix it when you bump into an edge case.