Only expand input for tex files

Only expand input for tex files. Otherwise also the input of other
files, like .tikz (pgfplots) or .pdf_tex is copied to the final tex
file.