Technically this is a use-after-free since `command_finished` frees
the `cmd` which is also the parent of `p`, so reset it early. All
paths lead to `command_finished` so setting it early is ok.
Reported-by: Rusty Russell <@rustyrussell>
Any file in this directory which is executable and whose name only
consists of alphanumeric characters, space, '.', '-' or '_' will be
automatically loaded when lightningd starts (unless suppressed with
commandline options).