fix filterDeleted

filterDeleted now uses [ -f ] test and also removes the flag file if the
original file does not exist.