Fix tarring to include only filenames

Change-Id: Ibdd55f159adf1855efa811625ce0c308fcd5571e
diff --git a/script/korapxml2krill b/script/korapxml2krill
index 98a41be..502727b 100644
--- a/script/korapxml2krill
+++ b/script/korapxml2krill
@@ -24,6 +24,7 @@
 use File::Glob ':bsd_glob';
 use File::Temp qw/tempdir/;
 use File::Path qw(remove_tree make_path);
+use File::Basename;
 use Mojo::Collection 'c';
 use String::Random qw(random_string);
 use IO::File;
@@ -119,6 +120,9 @@
 #
 # 2017/06/29
 # - Fixed exit codes
+#
+# 2017/07/04
+# - Fixed tar building process
 # ----------------------------------------------------------
 
 our $LAST_CHANGE = '2017/06/29';
@@ -834,8 +838,10 @@
         # Lock filehandle
         if (flock($tar_fh, LOCK_EX)) {
 
+          my $clean_file = fileparse($filename);
+
           # Archive and remove file
-          $tar_archive->archive($filename);
+          $tar_archive->archive_as($filename => $clean_file);
           unlink $filename;
 
           # Unlock filehandle