Yaml: give a more detailed error if the user supplies a directory instead of a yaml file. Bug #803.
Generate proper errors if sid,gid,rev values are out of range. Bug #779.