Support ?type=directory

Allows to create directory easily.