Added "need_first_push" logic to delete_in_dir().