m/persistent: Added and completed read_directories method