Removed usage of goto while maintaining the same logic, replace
system(gzip) with IO::Compress::Gzip and File::Spec to allow the
distribution to run in other OS than UNIX-like ones, added some tests
names to write.t