Fixed issue where directory and domain parameters were ignored.
Merge pull request #257 from cnoon/master

Fixed issue where directory and domain parameters were ignored.