PidExecutor - an executor that waits for the specified file to exist

This is an executor that starts a process, then waits for a specified file to come into existance. Usefull for integration tests, etc.
Is it possible that this would be the file created by some other process, e.g. the previous executor that hasn't yet finished?
How can you increase the certainty of a file being created by this executor?