Ensure dialogs are destroyed whether they are shown or not.
Files opened from command line would create a dialog but never display it, keeping a handle to it open. This interacted with a strange wx bug to cause a hard crash if a file in the same directory as the active directory of the dialog was edited with vim. This commit should prevent these crashes.