Some stuff for debugging the mac segfault

allow us to get core dumps, and add a helper script to get them

Allow me to use clang 3.5, and some changes in source to get around warnings
that 3.5 spews. 3.5 is needed because current version doesn't have
address/undefined behavior sanitizer.