This has been bothering me for a while, and I generally come down on the side of hugging. Hand shaking with a woman always seems to me like I'm forcing a male to male ritual on the situation. No matter how formal the meeting is, it always seems off. Now, granted, I'm not going to hug the female CEO of a company I'm doing business with at the first meeting, but even so, a handshake still feels off.
My general rule of thumb is – if I'm comfortable with the person and she's a woman, it's a hug. If I'm not comfortable, it's a handshake and a small inner sigh at the inadequacy of it. I don't consciously think about if it's work or not work, but I do of course tend to feel less comfortable with work contacts than I do with other social contacts, at least for the first few meetings.