Allow negative indices in `nth` list function

Allow negative indices between -1 and (-1 * list length) in the `nth`
function.