revert the usage of const since it cant be redefined causing potential issues when cwd is used but use var to fix the undefined issue.
revert the usage of const since it cant be redefined causing potential issues when cwd is used but use var to fix the undefined issue.

archiverjs/node-archiver