test-webservice: Null terminate GString correctly

Bug in previous work, limited to tests. Causes valgrind error.