Print the stack trace on lua errors
Actually trim whitespace when combining lines

regex_replace does not mutate the string in place.
Improve lua stack trace display