Refactoring duplicate file finding algorithm.