clean up obsoleted files in cookbooks we synch

also fixes bugs where dotfiles would be missed in loops that search
through the file cache.