Right, and putting a period in front of the sw folder will still cause the error to show up.
It's looking for a folder named "sw", not one named ".sw". There is a significant difference... it's not just appearance that you're changing.
You could rename the folder, and then go into your terminal configuration files and change the paths to ".sw", adding a period everywhere you have a path through the sw folder.
Or, you could just use the .hidden method or the SetFile method. Both work nicely. Both cause zero side effects. Both make it invisible. Your terminal will find /sw, and you won't get any more errors, and have a nice, clean root drive.
Putting a period in front of sw will make it invisible, but it will NOT fix the errors.
[Edited to make my post sound a bit less hostile... it came off a little strong