Fixed pdflatex path bug, lots of work on xhtml output for epub