Checking that the download file path does not exceed max length

Hit issues on Windows with max path lengths - noticed that most of the code was already in place, but not used.