scripts/realtime: close race contiion

'halcmd ping' will connect to rtapi_app and wait until the latter
responds to a noop ('ping') command. Once this terminates this means
rtapi_app is definitely up and responding.