Fix --min-y and --max-y handling
Fix computation of block number bounds (off-by-one)

The block numbers could be off by one due to incorrect rounding.

m_geom* now contain the minimum and maximum block numbers that
should be in the map.
Fix SEGV after failing to open output file: throw runtime error

The result of opening the file was not checked, resulting in a
NULL pointer dereference if it failed.