added download percentage to progress bar

also changed var name so it doesn't redefine `dir`