Actually assign correct index

If the new index is zero (first tab) then the condition will always fall back to this.index.
Merge pull request #39 from patrys/accordion-zero-index

sorry for the delay, but had to write tests for it as well!