add: use key_file() instead composing file name locally
run default handler if 1st script argument is key not handler name
use printf instead of echo
drop unused function have_key
return values from functions in variables instead of stdout