Cleaning up IOManager._handle_directive().