fix #1072: Race conditions in AgaviConfigCache::writeCacheFile() may produce corrupt files