Builds basestring properly with redundant param keys