add dry-run option and refactor link_dotfiles.sh