JS safety checks. Fixes issues edit had with a smaller image by:

* Ensuring crop dimensions are always positive values
* Fixing a case where this.orig_h/this.orig_w are strings, resulting in 0 + "400"
  to become "0400"