Enhancements to shell code intepolation: Try hard to find a directory where we actually can execute something. Patch by Keith Welch.
Fix for bug 1073816 and some improvements to debug utilities.