Makefile portability improvements (FreeBSD)
Preserve error in prepare() for caller
Modified to test integrity_check() and vacuum()