Convert URL to File using a URI so that URL-encoding is removed

Fixes #1429