Made unpickling test CWD-independent

Refs #24007.
Did you try it? The docs are a bit confusing but looking at the source code it seems like it merely passes along most of the args you give it.
```
def check_output(*popenargs, ..., **kwargs)
    ....
    with Popen(*popenargs, stdout=PIPE, **kwargs)
```

The arguments shown above are merely the most common ones, described below in Frequently Used Arguments (hence the slightly odd notation in the abbreviated signature). The full function signature is largely the same as that of the Popen constructor, except that stdout is not permitted as it is used internally. All other supplied arguments are passed directly through to the Popen constructor.