Non-zero base-index and rbenv support

This is really just a squash and rebase of the pull requests #47 and #79. There were some conflicts that I resolved when rebase #47; #79 rebased on top of master cleanly.