parse url before trying to get extension or suffer the death that is url params in file names