Fixed a bulkloading bug.

I fixed a bug related tu bulkloading. The last page is written
twice, once in load(), and another in close(). This results in
erroneous results performing relational operations.
Fixed a heap file R/W mode bug.