This applies when the deployment target is set to < iOS 6.0 or OS X 10.8, or not specified at all.
Zip files are usually packaged with their contents in the archive file's root. Tgz files are usually packaged with only a folder in the root. Make them both behave the same by moving that single folder's contents up. This is basically the opposite of what Finder does (which creates a folder for the zip file's contents, so you always unarchive into a folder).