A while back I came across a utility that you could pass an archive to and it would not only take care of figuring out the unarchiver to use, but use the correct command line options, and ensure that the contents of the archive ended up in their own directory instead of being extracted to the cwd.  I can't seem to remember what the utility is called, however, but it was very useful and I am hoping someone knows what it was called.
Utility to easily extract archives
archive