[client] (refactoring) 'remove_dir_if_empty' function moved to a 'Daemon' method since it uses the 'sharing_path' information which is contained in the 'cfg' Daemon instance attribute.