Use the stack for temporary memory buffers.

Reduces strdups.