commands-file: use gedit_file_chooser_dialog_get_window()

The OS X implementiton returns NULL, the GTK+ implementation returns
GTK_WINDOW (dialog).
commands-file: misc code clean-up for the file saving