tar detection looks for magic number (fixes #6868)