Do not delete last_test_dir with file handle open

Previous behavior does not work on windows.
Merge branch 'master' into ccm_develop

Conflicts:
	dtest.py
Merge branch 'ccm_develop' into force-stop