Small change.
Fix some bugs when extracting archives, add some tests.