Fixed yaml bug with leading spaces

The yaml decoder could not read yaml files that used spaces instead of tabs.

I also improved the error output for the yaml reader a little.