Update Rmarkdown.c

ret can never be negative, so error check is nonsensical. Use ferror instead.