Keeping Finder in sync with changes made in Terminal?

Not necessarily a fix, but I use this to refresh Finder windows - works after changing file visibility too, rather than killing the Finder.

tell application "Finder"
    set theWindows to every window
    repeat with i from 1 to number of items in theWindows
        set this_item to item i of theWindows
        set theView to current view of this_item
        if theView is list view then
            set current view of this_item to icon view
        else
            set current view of this_item to list view              
        end if
        set current view of this_item to theView
    end repeat  
end tell