fixed update_query_string with custom url;added tests for update_query_string