fixes issue #1024
hopefully fixes issue #1021
and other issues with file chooser (e.g. appending chosen directory name)
hopefully fixes issue #632 for Windows, Nimbus and GTK+ LAFs