I'm using Mountain Lion (10.8.2), and the script was a bit dodgy for me.
Apparently, sometimes 10.8 likes com.apple.finder and others com.apple.Finder
I can't figure out a logic to but, here's a good way to alter filerevealer.sh in the package:
#!/bin/bash
visible=""
flag="$(defaults read com.apple.Finder AppleShowAllFiles)"
if [ $flag = "0" ]; then
"$(defaults write com.apple.finder AppleShowAllFiles -bool true)"
"$(defaults write com.apple.Finder AppleShowAllFiles -bool true)"
visible="visible"
elif [ $flag = "1" ]; then
"$(defaults write com.apple.finder AppleShowAllFiles -bool false)"
"$(defaults write com.apple.Finder AppleShowAllFiles -bool false)"
visible="invisible"
fi
"$(killall Finder)"
echo "Hidden files are now ${visible}."