Add virtual destructor for IOSHandle and IOSDirHandle.

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