Fixed force linking to an existing directory

Previously, trying to symlink to an existing directory with the `force` flag would error.  It was calling `unlink` on a directory.  This fixes that by checking if it is a directory before removing.

Let me know if there is anything else you need to merge this!