fix test runner issue where os.environ was getting a non-ascii key/value pair
fix test issue under windows where simulation thread was not releasing connection to the database