add missing bounds checking to download.go
add missing bounds checking to download.go

NebulousLabs/Sia,ChrisSchinnerl/Sia,ericflo/Sia,NebulousLabs/Sia,ericflo/Sia,mharkus/Sia,mtlynch/Sia,ChrisSchinnerl/Sia,mtlynch/Sia,mharkus/Sia