Fix bug related with pdflatex output directory

As report by @abelsiqueira the PDF was created in the current
directory and not in the output one.