Add tex.toNakedString, fix bibtex FSM, fix bibtex path resolution