Emergency fix. Not all URLs represent files of course. Besides, this is a much nicer method to obtain a name from the URL.