Fix shared001
Use a proper executable (rather than a shell script) in T6106

Fixes the test on Windows
Tidy up some tests

We now use pre_cmd rather than cmd_prefix wherever possible.
Also, pass "-s --no-print-directory" whenever we use pre_cmd.