Added test to raise ImportError for missing yaml.

This test makes sure an import error for YAML is raised when it is not
installed instead of saying the serializer does not exist.
Added yaml import that raises ImportError.

This will return a meaningful exception to the user when the YAML module
does not exist and the requested serializer format is yaml.