PrepareFiles.groovy: proposed fix for the classesDir == resourcesDir bug

The previous code appended all files from the classes and resources directory
unconditinally. As a result, a service file could appear twice.

Use a Set instead; collect the file objects' canonical path in it and walk that
Set to add relevant files to the FileCollection.