Enable to create new file types

Adding function setNewFileType() for creating new file types (e.g. png
from jpeg)