Scotch: build shared libs and run tests.

Include a patch to fix the ptcheck tests and to correct an omission
in the tests Makefile.