Fix Makefile and sqlite testing