Hmm and also note that the file names are added using the value of `getAbsolutePath()`. If its absolute path were not-canonicalized it would not work. 

Why not just have `File` objects in the set `files`? They implement the desired `equals()` semantics:
http://docs.oracle.com/javase/7/docs/api/java/io/File.html#equals(java.lang.Object)