'Update user configuration file.
Remove empty sections. If resulting config isn\'t empty, write the file
to disk. If config is empty, remove the file from disk if it exists.'

def Save(self):

    if (not self.IsEmpty()):
        fname = self.file
        try:
            cfgFile = open(fname, 'w')
        except IOError:
            os.unlink(fname)
            cfgFile = open(fname, 'w')
        self.write(cfgFile)
    else:
        self.RemoveFile()
