Improve secretkey app, add `-o` to specify output file. Add `keyfile` to most functions.