ENG-5759: fix mkdir check for rejoin.