Fix minor bug in getFileNameFromURL