Fix catching of YAML parsing error in Ruby 2.*

Ruby 2.* uses Psych under the hood for parsing YAML, deprecating Syck.
Now Psych throws a Psych::SyntaxError for parsing error whereas Syck
throws ArgumentError.

This also fixes test failures for #1383.

Tested:
- Ruby 1.9.3-p545
- Ruby 2.1.1-p76
- rake test:units
- rake test:functionals
- rails s