Dropping the directory if it is not needed.