Add support for generating code from a YAML file

This feature only works if PyYAML is installed and importable.  If so,
then it will attempt to load as YAML any file ending in ".yml" or
".yaml".  Otherwise, it will continue to load as JSON.