Split out key generation

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Use get_file() and sudo_write_file()

... instead of copy_file()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>