I did the same as annk. It was simple, required a few rags or towels to act as dams and diverters, and worked well when the winds piped up. I had a 3" caprail and that made it easier than caprails with the aluminum
railing. I also found that by using a towel as a diverter to move the wide deck torrent towards the deck fill really helped.
I've seen folks that had fresh water fills in less suitable locations use the deck drains. They installed a "Y" valve with one hose going to the tank and the other overboard
The tough part, at least it was for me, was waiting for the decks to run clear. Depending on the amount of rain, sailing conditions, and other factors, it may take 10-15 minutes to get the water clear enough to put in the tank.
As for concerns about water quality, I've found that a good filter and some common sense seemed to work
best. Rain water is quite clean and after getting the decks clean, quite sweet. If you're in a metropolitan location, you may have to wait longer for the rain to wash the air clear and get the deck clean.
The biggest problems I've had with getting water was from shoreside places. Some of the water sources clearly weren't as pure as waiting on the rain. In that case I put the jerry jugs through a basic filter (spun particulate and carbon) and added a 1/4 cup of bleach to the tank.
A number of times the rain never lasted long enough to get the water clean enough for me.