Apply some fixes made for mpv

This removes the (unnecessary and fragile) command line mangling
and uses the child process' exit code.