test: refactor test-cluster-master-error to be more resilient
Using the filesystem for communication circumvents the issue described in the comment where a new process could end up picking up the process ids that the test case checks for.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines