added missing dot_dir_exists function