Fixed potential race conditions in Cache and NamedLogger.
Specifically simultaneous file io.  Fixed with flock()