Allow control of the file chooser from the keyboard.

Cursor keys for movement.
Enter for select.
Esc for back.

Also, fix crash on exit of the file chooser.