Added directory check to symlink creation to fix weird behaviour on Windows.