Properly delete non-keyboard options

options.items is a list of tuples so the dict-like removal didn't work
Properly deal with options without keybindings

The previous code would have added --input=conf=None to the command line
which was not correct.

build_keycmd_file was also not properly checking the validity of
`keycmds` which was empty and not None if no keybindings were in the
config section.