Fixes issue #3122 of filenames being taken as URL