packResources: add an option allowing outfile overwriting