Dont search for main tex file unless necessary

LatexBox has an autocommand that is triggered when buffers are
unloaded.  The autocommand calls LatexBox_LatexmkStop, in order
to clean up background processes.  This function looks for the
main tex file.  The update moves the search for the main tex file
name until after we know something should be done.

Fixes #111