made output directory configurable in generatePdf and added possibility to add pdflatex options