Add ability to extract specific paths (very basic).
Fix a few memory leaks.