Tools/MeshExtractor: Added some locks because concurrency.
Race conditions were detected with a race condition detection tool.