Don't replace with %20 when the filename isn't a URL

This line was making local directories with a space in them get subbed with %20.  For instance, if your path to your image is "/i have a space/in my dir/file.jpg", it was becoming "/i have%20a%20space/in%20my%20dir/file.jpg" which doesn't resolve.