Make symlink operation atomic

Took from this PR : https://github.com/capistrano/capistrano/pull/1097