[CORE] remove usage of Directory#fileExists

This commit removes the usage of #fileExists which has been
deprecated long ago an can be a source of race conditions.
yeah so this is my assumption here since we delegate all the lock factory stuff to the primary anyway I think it should work just fine? All tests pass so far after like 10 rounds