Switch to js-yaml and improve error handling

Switching to it since it's much more popular, faster and safer.

Also only allow JSON types.
Attempt at fixing yeoman/update-notifier#13