refactor dotfiles copy

Separate file for dotfiles copy.