Lock the cache file while writing to prevent partial reads
Merge pull request #246 from cddude229/lock-cache-file

Lock the cache file while writing to prevent partial reads