Fixed loader to use Yaml mapper for yaml files

hopefully this is self-explanatory :-)