Ensure the we are only modifying the path name when adding @2x.

If `document.createElement()` exists use that to create an 'a' element to
parse the URL otherwise simply assume the first '?' seperates the query
params from the rest of the URL (weak assumption).

Reguardless of method used, run regex replace on the path part only to
prevent @2x from being added to query params.

See added unit test for more info.