Preserve querystring when ensuring path ends with slash