Remove '?' from paths with empty queries