Fix detection of when Spotify exits

Spotify is now spawning multiple processes so the existing code to
detect when spotify exits didn't work right any more.