get file extension even if url has a query