wait for latex to finish

add call to wait for latex to finish.  Otherwise there will never be a
pdf file to copy.