pass file mode into the archiver

fixed #109, take the file mode into consideration to avoid using default one.