Fix wtperf errors detected by valgrind: a buffer size calculation didn't include the NUL terminator, and some memory wasn't free.  While there, simplify cleanup by relying on the semantic that free(NULL) is a noop.

refs #633