Fix url retrieval

See http://www.w3schools.com/jsref/prop_doc_url.asp
This refs #281