Better encoding support + rmarkdown::render. Fixes #15 and #17