Let ProjectExplorer pass in files.

This is cleaner than having the ProjectExplorer fetch the files from the
server itself. It also makes testing more straightforward.
Fix error when deleting directories.