Neil's script will work so long as you didn't use the key "True" (a synonym for "1") in the original command to turn on hidden files. To turn Finder back to normal, copy and paste this entire line into Terminal:
defaults write com.apple.finder AppleShowAllFiles 0; killall Finder
Press 'return' to enter it.
I have a free, one-click app for toggling hidden files on and off that you can download and keep in your Dock if remembering Terminal commands is too boring. 🙂 .
You can download "Reveal.app" from here:
http://applehelpwriter.com/apps/
(disclaimer: this links to my personal website which is in no way endorsed by Apple)