Add support for createDocumentFromSource.

Use finfo_open  to get content_type and file_get_contents to get content.