SD memory protocol sniffer debugger
There's several low-cost projects that emulate SDIO devices – in fact, SDIO is  a standard you can use to implement your own device classes, so this is not surprising.

A recent effort is scanlime's on-the-fly FAT file generation  SD card emulator (video here).

You can never know what's stored inside an SD card, because the external block device interface is only linked through firmware to the internal memory blocks (which typically are of a different size, and are being exchanged on the fly – keyword wear levelling, copy on write). So whilst your SD card "emulator" might detect a bug in your OS, it might not detect a bug in your SD card's memory controller firmware or a flash defect.

From a personal point of view, this looks like you want some PC-attached logic analyzer (e.g. sigrok + fx2lafw + FX2 evalboard) that captures (possibly hardware-slowed down) SD transactions, and interprets them in software on the PC, modifying an in-RAM file system image that should be consistent with what happens on the SD card. That way, you could take "snapshots" at any time, and with sufficient knowledge of the (luckily, very simple) FAT filesystem, analyze where the errors happen.

I'd argue that's only slightly better than directly debugging the file system driver of whatever's writing to the SD card, and software debugging is much, much easier. If you can be halfway sure the file system driver is bugfree (e.g. you use Linux' fat implementation, or VXworks, or windows embedded), you'd try to rule out bugs in the SDIO driver part of the OS, and if that shows no bugs, then, well, you've got broken hardware.