Fixed Windows line endings support.

Reading in plugins.txt and loadorder.txt wasn't removing the \r
characters because the stream is effectively treated as binary since
it's opened using a file descriptor, and so only \n is recognised as a
line ending character.