Update Rmarkdown.c

ret can never be negative, so error check is nonsensical. Use ferror instead.
Merge pull request #48 from anovember/patch-2

Update Rmarkdown.c