fixes and simplifies tar extraction