Fix cached folder nodes (fixes #629)

These changes update the local folder nodes on remote changes and remove them if they are identical to the common node.