fixing Bug #4 by using a hidden local file to track number of executing threads

reduces the dependence on environment variable lookup to determine the current number of executing threads.  This allows the code to be used in a Jenkins CI type environment where many environment variables may be set by other processes running the tests.