Fix "[]" usage as default arguments

inputPrimes=[] is evaluated when the function is first defined, not
when it is run, so the list is common to all the function calls!
Replacing it with None and then initializing an empty list in the
function body.