Ruby2: catch YAML parse errors correctly.

While Psych::SyntaxError was a subclass of SyntaxError in 1.9.x,
that's no longer the case in Ruby-2.0.0.