Here is the doc of ```.is_dir()``` :

    /// Whether the underlying implementation (be it a file path,
    /// or something else) is pointing at a directory in the underlying FS.
    /// Will return false for paths to non-existent locations or if the item is
    /// not a directory (eg files, named pipes, links, etc)
    ///
    /// # Error
    ///
    /// Will not raise a condition
    pub fn is_dir(&self) -> bool {
        ...
    }

At least, it should not go through symlinks.
If I understand correctly, the current version might cause race conditions, I'll rework everything tomorrow.