check for directory instead of file
Merge pull request #12 from amaabca/directory_check_ln

check for directory instead of file