Add pretty_print class.
Use pretty print class in memory-limit-exceeded warning. Fixes #156.