Fixed windows support

Change-Id: I042ab736bb0fc6e7dce17c330b3bc663be60cc79
diff --git a/t/script/archive.t b/t/script/archive.t
index 308414a..d797c20 100644
--- a/t/script/archive.t
+++ b/t/script/archive.t
@@ -10,6 +10,7 @@
 use Test::More;
 use Test::Output qw/:stdout :stderr :functions/;
 use Data::Dumper;
+use KorAP::XML::Archive;
 use utf8;
 
 my $f = dirname(__FILE__);
@@ -21,6 +22,10 @@
   'archive'
 );
 
+unless (KorAP::XML::Archive::test_unzip) {
+  plan skip_all => 'unzip not found';
+};
+
 # Test without parameters
 stdout_like(
   sub {
diff --git a/t/script/extract.t b/t/script/extract.t
index 2ea1e13..8e7cdfd 100644
--- a/t/script/extract.t
+++ b/t/script/extract.t
@@ -10,6 +10,7 @@
 use Test::More;
 use Test::Output;
 use Data::Dumper;
+use KorAP::XML::Archive;
 use utf8;
 
 my $f = dirname(__FILE__);
@@ -21,6 +22,10 @@
   'extract'
 );
 
+unless (KorAP::XML::Archive::test_unzip) {
+  plan skip_all => 'unzip not found';
+};
+
 # Test without parameters
 stdout_like(
   sub {
diff --git a/t/script/single.t b/t/script/single.t
index 9d8d28f..40b7940 100644
--- a/t/script/single.t
+++ b/t/script/single.t
@@ -72,6 +72,7 @@
 while ($gz->read($buffer)) {
   $file .= $buffer;
 };
+$gz->close;
 
 ok($json = decode_json($file), 'decode json');
 
@@ -83,8 +84,8 @@
 is($json->{data}->{stream}->[0]->[0], '-:base/paragraphs$<i>1', 'Paragraphs');
 
 # Delete output
-unlink $output;
-ok(!-f $output, 'Output does not exist');
+is(unlink($output), 1, 'Unlink successful');
+ok(!-e $output, 'Output does not exist');
 
 # Use a different token source and skip all annotations,
 # except for DeReKo#Structure and Mate#Dependency