Adding MalformedURLException protection for Windows.

Not particularly elegant, but it prevents the exception from stopping the process working on Windows.