Merge pull request #49 from sunyc/master

Rewrite read_file() to use a single static buffer.
Fixup read_file implementation.
Make make test actually fail the build.

Also improve the existing read_file tests.