improve _openDownload function to not modify window.location

this will allow outstanding log.info and log.debug to stay in the same
window and not get cancelled

Fixes #1281