Add sexp_append() function with corresponding test.