Merge pull request #107 from Trott/refactor

refactor
return error if bad dir specified
Merge pull request #110 from Trott/error-on-bad-input-dir

return error if bad dir specified