Don't ignore "times" parameter in duplicateList

When calling duplicateList, elements were always duplicated three times,
no matter what was passed on to the function.
This closes issue #2.