Feature request: use standalone document class for output files

It would be really nice if there was an option to wrap the output file(s) in a standalone document

\documentclass{standalone}
...
\begin{document}
...
\end{document}

This would allow them to be compiled, well, "standalone" without further LaTeX magic to be required!