redfuture and yifeijiang Tools/map_gen: Use with statement to open file.
Lacking f.close after called open in the old code, though this is
not mandatory, use with statement is better.
Latest commit 23b7265 Sep 10, 2018