Properly closes logging and puts test files in proer places

Problems probably only visible on Windows.
Excludes harness component from licensing-check