Changed directory check to -d
Merge pull request #589 from ihistand/v3

Fix for incorrect symlink creation