added parentsUntil method
Filter duplicates and add  more tests for parentsUntil method
Merge pull request #337 from finspin/parentsUntil

Added parentsUntil() method (issue #144)