Fixing cases where "undefined" was printed instead of an error message

Turns out there are cases where an err will not have a stack, even though it should. This catches that condition, and shows the message when stack is unavailable.