Modified tex2pdf to fail without hanging

This can happen when files are missing. pdflatex asks for files via stdin, but
tex2pdf is capturing stdout to make up for pdflatex not providing a valid
integer returncode to indicate failure.