Add flag remove_dir_to to output task