Bugfixes in the dotfiles handling code