Update download.rb

Fixing URI parsing to allow file names with square brackets in them.