Added ability to print backtrace on segmentation fault.

This will help substantially to track and fix bugs in the future.