Fixes #257: use regex to detect : at the end instead of substring(nchar())

When YAML contains multibyte chars, nchar() does not work if front_matter's
encoding is unknown
Merge pull request #264 from rstudio/bugfix/YAML-multibyte

Fixes #257: use regex to detect : at the end instead of substring(nchar())