Makefile and .gitignore
fixed two errors

 - spurious wakeup by doing cond_signal outside of the mutex.
 - % of a negative number is a negative number.