Prevents duplicate perk names in tree

Adds test to check the presence of multiple perks with the same name and
a matching test case.