for filename in args.infile:
    base, ext = os.path.splitext(filename)
with open('{}1{}'.format(base, ext), 'wb') as outf:
    with open(filename, 'rb') as inf:
        output = csv.writer(outf)
for line in csv.reader(inf):
    pass
TypeError: coercing to Unicode: need string or buffer, list found