Here are some utilities that are useful for testing or repairing flash media:
SD Association Formatter - Running this should be your first step if you have filesystem errors on a card. I recommend doing a Full (Over Write) format.
H2Testw - Test for proper card capacity.
FakeFlashTest - Another capacity test. Direct download link
here.
RMPrepUSB - this does much more than just testing; you have a number of filesystem operations available. Be careful!
Fat32Format - For formatting any large storage media to FAT32.
Crystal Disk Mark - Excellent free benchmarking utility for various storage media.