tests: fix test-transaction-safety.t on Windows
Mostly this is about `C:\dir\sub` style paths being turned into `C:dirsub` by
MSYS, and not being about to execute shell scripts in hooks directly. See also
a12819559ccb::9e3979a25bfe.
Differential Revision: https://phab.mercurial-scm.org/D10762