Application stop fix

The problem: when `application:stop(exec)` is called, the shutdown process should not complete until the exec-port program has cleanly exited, if at all possible.