how to deal with the Finder bugs in El Capitan
The standard method for doing this, either in Terminal or in code (via NSTask) has always been
defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder.
In every version of OS X from 10.6 thru to 10.10 this works as expected. In 10.11 I see a reproducible though not always consistent bug when using any GUI-wrapped app to toggle this Finder setting. The bug basically ends up with Finder showing the opposite of both what the app shows and what ‘defaults read’ shows (see image above; the value should be ‘1’ when invisible files are visible).
We believe a related bug is that Finder sometimes fails to show the new version of an app in the Finder preview after the app has been updated.
In both cases, there’s a couple of ways to deal with it (albeit temporary until Apple applies a proper cure):
i. log out then log in
ii. issue a ‘killall Finder’ on the command line
iii. purge the RAM then toggle the setting again in whatever app you’re using to toggle invisible files.