Misc fixes to tests and makefiles