fixes and improvements in xnotify.py