Rewrite read_file() to use a single static buffer.
Adding a check to avoid an potential crash.
Merge pull request #49 from sunyc/master

Rewrite read_file() to use a single static buffer.