Improve extension guessing when URL has parameters