bug 1009780 - Improve open mechanism for downloads.

r=crdlc, yury