correctly check exists for ::File, ::Dir, and ::Link