Fix failing .index without trailing / (Closes #8).