Make makefile respect CFLAGS from env variables.
Fix buffer overflow and segfaults in unit tests.
Fix segfault when unit tests are run from wrong directory.
Ignore gedit temp files.