test: Add code to test binaries which makes it so when the segfault, they print backtraces

Not sure if we want to actually merge this. But it was handy for me when we couldn't use gdb, as it still worked with the "--no-symbolic-backtrace" flag passed to the unit test.