I'm running MacOS 10.10.1 Yosemite and the Finder window is not refresing to show new files I programmatically put in the directory.
Switching to the parent directory and coming back didn't work. Closing the Finder window and re-opening did not work.
Finally I had to open a terminal and entered "killall Finder". This finally worked.