Fix creation of build directories

Use dirname, not basename, to determine the build directory to be created
when generating shell test programs.
Parameterize atf-sh in atf-sh's tests

Add a build-time override for the location of atf-sh in atf-sh's tests so
that the caller can choose to install atf-sh outside of the path.  This is
done in FreeBSD, for example, where atf-sh is hidden in libexec.
Allow overriding the shell interpreter in atf-sh

Add a -s flag to atf-sh to support explicitly specifying the interpreter
to be used.  Some test programs may need, for example, bash extensions
so they should have a chance to explicitly specify that.