bug 1009780 - Improve open mechanism for downloads.

nit: if ( and !== instead of !=