Makefile should be mac compatible

The last Makefile changeset was written specifically for Linux. Sadly
this meant that some functionality broke for MacOSX. This patch should
reintroduce a working build on Mac. Mostly it's due to odd behaviors in
mktemp from coreutils vs BSD userland. Mac userland is garbage.