Fix utf BOM error and endnote format irregularities.

Endnote doesn't seperate the token '%(' from the data with a space.
Fix bunch of nil errors, fix file resolver