Disallow install_url or update_url to run at improper situation

http://lists.opencompute.org/pipermail/opencompute-onie/2014-November/000309.html

There are two parts in the pull request.  One is to prevent install_url or update_url from running at improper situation, the other is making sure fetched image format suitable for current mode.