Makefile updates for Automake 1.5+. Test script updates