Paxgen fix stackstrings

James,
this fixes some stack/heap overflow issues that AddressSanitizer caught. I don't think they were causing actual problems (except when actually running AddressSanitizer itself, since it aborts for all errors).

I think this is the last pure bug fix, for now. Thank you for including them!

Philip