Added check for 2x variant when document is served via file URI scheme

When a document is not served via a web server (e.g. when it is opened via `file:` URI scheme) retina.js is not able to check if there is a 2x variant of the image available, because the HEAD request only works for HTTP protocol.

I came across this issue when I tried to use this awesome little script on a [Cordova](https://cordova.apache.org/) app to make it look nice on retina displays, but it did not work, because of this issue. Therefore I've patched the script to make it work!