add write bit to the directory before removing it