Well i did group work with idiots too, I spent like 6 months with them and they never contributed to anything at all, out of 5 of us 3 of them did nothing (1 ended up getting kicked out, one failed the module, the other one scraped 42%). I told my lecturer (I mentioned it near the start and about 4 more times through out the projects) that they did nothing and they asked me to get together every bit of work I had contributed and said the same to the rest, they can tell whose work goes in to the project based on how its written and how well structured or unstructured it is (its pretty hard to fake it when its put together, and their are usually email logs of who sent what to who).
The moral is to tell the lecturer early on if you feel its not progressing enough, they will have words with everyone, if it still gets nowhere ask to be switched groups, they usually try to split up people who know each other too well as they prefer you to experience a range of different people (usually ones you would not have come across much, such as different cultures, people dressed differently to you, people who have different personalities etc).