Improve exception handler: detect read or write on SIGSEGV (linux only), create more suitable core dump, reduce usage of fprintf()