fix uploadDir with deleteRemoved and add test