Tests and fixes for permutations (Sections 9.1-9.5)
Add Travis test script