Added a lock so that multiple threads won't clash when they are trying to create average, variance, and standard deviation files.
Added a lock so that multiple threads won't clash when they are trying to create average, variance, and standard deviation files.

MyersResearchGroup/iBioSim,MyersResearchGroup/iBioSim,MyersResearchGroup/iBioSim