Wait for file/directory exists