delete left-over test artifact jdr_...zip on windows and improve tests

The JDR module will create a test ZIP file in the base directory, not close it but try to delete it.

The delete will fail on Windows: this patch is fixing it by adding a `close()`.
This is mainly to keep the GIT tree clean after a build.

This patch will also make sure the file is not created in a source control managed directory anyway by using `setOutputDirectory("target")`. This way the test can assert the relative output path name as well.