Rely on Gitlab::Shell public API, not reading internal files it may use
requested to merge 24599-spec-lib-gitlab-backend-shell_spec-rb-causes-other-specs-to-fail into master
EE brother of gitlab-org/gitlab-ce!7557 so that specs can pass on EE until the CE->EE merge (no need to pick it into stable since the CE MR will be picked already).
Closes #24599