python: write distutils.cfg atomically