Bounds-check drawImage calls (ensure positive width and non-negative offsets)

 Wrap drawImage calls to check that the image has a width (and therefore loaded).  Fixes IE.