uploadDir/downloadDir: fix incorrectly deleting files

closes #35