Linux: Spotify Screensaver D-Bus Script update

Following on from my previous post about a script to Pause and Play tracks on spotify based on the status of the screensaver as reported by D-Bus on a Linux Desktop, here's an update:

With the latest versions of Spotify on Linux (e.g: 0.6.1.309.gb871a7d0, 0.6.2.291.gcccc1f58) the DBus interface has changed a little which has resulted in the need to make some changes so that the playing status is tracked correctly.

The code can be found here on github as a Gist or the raw file.