Added method to read a file as a string, ensuring it is '\0' terminated