Directory replication in distributed systems