flatten a latex multi-file latex document (expand all \input)