Make path stripping optional in `.extract()`

Fixes #664.
Merge pull request #665 from kevva/strip-dirs

Make path stripping optional