libroot_build _kern_read_dir(): reset errno before readdir()

Since we're checking errno when readdir() didn't return an entry, we
need to reset it before, or we might see a spurious error value.