Inserts node at nth position in a linked list.