Better extension matching

- Allows more than one segment in the extension, and accurate matching
  against files that have multiple extension segments.
Merge pull request #4 from weierophinney/hotfix/suffix-discovery

Better extension matching