Updated save_dotfiles function