recursiveMatch must be called on valid line ranges. Fixes #3

We were recursively passing line ranges where the first line was after the
second line, which caused strange behaviour.
Add TestCases that all previously caused crashes.
Merge with upstream, published 0.1.1