Updated `--build-query` to accept an alist

This prevents a bug that was occurring when a key contained a nil value,
as nil is a symbol and would be appended as a key instead of a value.