Fixing leak in test code, updating makefile with new thread and mutex modules.