Add "input command

Allow to use "input, which will be converted in \input but appearing
before \begin{document}.
The actual code change was an almost blind copy-paste-modify, I don't fully get the code.

This will be required soon for the updated version of your document.