Handle mmaps where some pages of the mapping are beyond the end of the f...

...ile; these pages generate SIGBUS when accessed.

Resolves issue #1038.