[OS-BUILD PATCHv2] Fix tarball creation logic