read-cache: add verify_path_internal()