Readd rmtree to delete temporary files
Fix selection of files initially