Changes and Makefile for OSX, add .gitignore, #define bug in util.h

Seems to work on OSX, but haven't tested much.  It at least builds and runs.