Select first image in settings dialog when directory changes
If the directory is changed to a new location, and the the settings dialog is closed, it won't remember the change. Selecting any item in the image will 'remember' the new directory that's set.
Also fixes a minor memory leak in the dialog.
Closes #29 (closed)