[FIX] Fixing resource leak in tests system.

Leak was not critical, occurred at the end of a test suite run.
Merge pull request #611 from holtgrewe/fix/test-system-dir-resource-leak

[FIX] Fixing resource leak in tests system.