Improved method of killing ffmpeg cleanly