Tests choose relevant buildscript shebangs.

Shebangs used buildscripts generated by tests are now based on the
actual $PATH used by the interpreters in question. (This is done to get
the tests to run with MacPorts under MacOS X.)