Haha, I know, don't you love the internet? 
I actually noticed that it was working fine with most of the duplicate files, but was stopping near the end, and it seemed like it was stopping at the same file every time. I figured out a way to print what file it was stopping at, and it turned out that filename had an umlaut over an "i". My suspicion is that the exception had something to do with text encoding. I changed that one character in the filename, and voila. It worked!
Thanks for responding so many years later! And again--thanks for this post!

I actually noticed that it was working fine with most of the duplicate files, but was stopping near the end, and it seemed like it was stopping at the same file every time. I figured out a way to print what file it was stopping at, and it turned out that filename had an umlaut over an "i". My suspicion is that the exception had something to do with text encoding. I changed that one character in the filename, and voila. It worked!
Thanks for responding so many years later! And again--thanks for this post!