I haven't actually run my modified code as I have Windows as my primary machine and run XBMC in a VM with zenity for XBMC use.
I should really start testing with XBMC on Windows though :)