Add .{git,hg}ignore.  Create bin, lib directories during build.
Fix error in Makefile.
Avoid compiler warnings.