null out refs in DirectoryNodes when children are all read; move MemoryPathRegistry into main src