Fix directory / symlinks identification