added support for safe malloc/realloc. added memory.o in  Makefile and bwalite in .gitignore