Bug 1032745 - Use local resources where possible when installing web apps

If we run on device and can't connect to WiFi then the test would fail to use the locally served resource. That said, the check for WiFi connected should be /after/ the `connect_to_network` call. I will fix that.