Fixed off by one error.

Not sure how this worked before but there is an off by one error that is clearly demonstrated in this test:

It used to be:

```js
history.prev().should.equal('baz');
history.prev().should.equal('bar');
history.prev().should.equal('foo');
history.next().should.equal('foo');
history.next().should.equal('bar');
history.next().should.equal('baz');
```

See the repeat `'foo'` in the middle. While using it in a REPL (or chat) when the user cycles between next and prev in the middle it gets stuck on one item: `up -> foo, down -> foo, up -> foo, down -> foo`.

The following should be the correct behavior:

```js
history.add('foo');
history.add('bar');
history.add('baz');
history.prev().should.equal('baz');
history.prev().should.equal('bar');
history.prev().should.equal('foo');
history.next().should.equal('bar');
history.next().should.equal('baz');
```