correct assignment of the relativePath of detectorData
Upgrade writeZipArchive function:

 - adding error handling routines
 - make it working in Windows and Linux