bug 1009780 - Improve open mechanism for downloads.

r=crdlc, yury
Merge pull request #20162 from nullaus/bug1009780

bug 1009780 - Improve open mechanism for downloads.