Use tar's compression detection mechanism

This fixes issues like #344 where the compression format is not tar.gz;
some versions of tar (eg GNU tar 1.26 which comes with Ubuntu 13.04)
will detect the compression format by looking at the file, if you omit
the compression format option (eg `tar xvf file.tar`).

This even works if a bzip2 compressed tarball was given the filename
"foo.tar.gz".

If `tar xvf` fails, fall back to `tar xvzf`.