Package.extract_file: determine basename using lsar

The current code assumes there will only be one file extension. This switches to using lsar to determine the actual directory name. Ideally we'll switch to using lsar's JSON output, but it's currently broken for nested archives.