Fix behavior of tilesets with number of x tiles not a multiple of 8 inside the Resource dialog. Fix #31.