Use context manager with mmap object
Use context manager with mmap object

The `mmap` object was not being closed when we were done with it
previously. This fixes that by using a context manager to close it after
updating the hash with its contents.

DudLab/nanshe_workflow,nanshe-org/nanshe_workflow