check if infile is dir in mwmatching-io.py and iterate on all contents