This doesn't actually work any more. Google have since replaced the pop-up contacts page with a highly painful obfuscated javascript page, meaning that it must be analysed and a subsequent new script written. Sorry.
- Right-click here and click "add to favourites", give it a name like "Gmail Contact Export". If you get a warning, it's only because this uses javascript like Gmail itself does.
- Click Here and then click the favourite you previously added, copy-paste what comes up into notepad or go to file->save as and choose "text file" for the save as type.