(hopefully) Final fix for issue #109, Viewport Broken on Hide.

This fix implements a private method, used by updateOnce and openTileSource in viewer.js, named _getSafeElemSize(), which refuses to return 0 for either x or y. I was unsure as to where to place the method, and so placed it after all of the public functions.