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