(PUP-2946) Don't use private FileUtils methods
Previously the compare_stream method was using private methods in
FileUtils, which could be subject to change at any time (as private
methods are wont to do). This commit pulls in the implementations of
those methods to isolate ourselves from those potential changes.