This does not answer your very specific question but provides an alternative solution.
Assuming you want to have easy and quick access to the hidden files and not have them open all the time, which is not recommended anyway.
Here is a little script that Automates the process down to a single click to Show or Hide.
It eliminates:
1-possible problems with hidden files showing all the time
2-opening terminal and typing the show hidden files, command each time.
3-Extremly users friendly.
Install this as application onto your dock for easy and fast access.
-- AppleScript to toggle hidden "." files
-- Submitted by Baltwo on Apple Support Community
try
do shell script "defaults read com.apple.finder AppleShowAllFiles"
on error
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end try
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is equal to "0" then
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end if
do shell script "killall Finder"