There does exist a quite easy solution, but it lacks usability. The solution is to provide two shell scripts which execute a command that show or hide the hidden files. However it is necessary the “Finder” application after these instructions (can be done by the script). Usability wise it is not a good solution, because you have to re-navigate to the path you were before. I was not able to find a solution that works “on the fly”.
Show hidden files:
defaults write com.apple.finder AppleShowAllFiles -boolean true;killall Finder
Hide files:
defaults write com.apple.finder AppleShowAllFiles -boolean false;killall Finder