The issue was found by using f_mkdir("directory_name").
The function always returned FR_DISK_ERR due to an unhadled case in sdio_write_sectors().
According to this documentation: http://www.convict.lu/pdf/ProdManualSDCardv1.9.pdf#page=92 stop transmission command should be sent after writing multiple blocks.
This patch fixes this bug also adds a test case for it.