Scans the specified paths and persists pairs of root path names and leaf file names.