GFileChooser: fix various issues that could lead to a crash

r? @frank-trampe

cc #1640 (for the second checkbox, at least).