Add --list-target-tex option

Along with the necessary driver.py refactoring.
Refactor filesystem.py