Add virtual destructor for IOSHandle and IOSDirHandle.

The destructor should be virtual so that when an base pointer is
deleted, the correct destructor can be called.