Fix bug with .expected files

Refs #10150