build_query_string function

Build a query string from a set of named parameters