Changed class-wide chunk_offsets array to a local variable.
Added method to RegionFile-class to calculate index for chunk arrays.