system_tests currently rely on cat, echo, false and sh being available in PATH at runtime.
This PR:
- Removes these dependencies.
- Reduces the number of platform-specific code paths.
The change is primarily motivated by my work on maintaining the bitcoin-core package in Guix. It enables the removal of the existing bash and coreutils native inputs, which in turn makes it possible to drop the implicit dependency on qtbase@5 (see https://codeberg.org/guix/guix/pulls/4386#issuecomment-8613333).