Fix #451: Build broken on OSX.

Problem:  Build breaks in OSX if macports ncurses present, due to
          header conflict involving 'term.h'.
Solution: Modify include search order.
Changed testdir/Makefile to use Makefile wildcards instead of SUFFIXES