Fix URL building when the base URL already has query parameters.
Test for building URL with base query parameters.