add "directory" option

Closes #4.
Merge pull request #5 from component/add/directory-option

add "directory" option