fix create api method signature to support directory creation, value can be nil. add new exception
Merge pull request #23 from ranjib/bugfix

Fix create api method signature to support directory creation