i think that would be even better. In (the unusual) case the pidfolder is a symlink the -d would fail.