GFileChooser: fix various issues that could lead to a crash

r? @frank-trampe

cc #1640 (for the second checkbox, at least).
Ah, that makes sense. At least on Linux the backtrace is a bit more useful... :thumbsup: