Added add_query to url with test. Should probably be implemented using attribute iteration instead.