makefile creates the lib directory if needed; also cleaned up an 'assign NULL to char' warning