Catch Throwable when generating preview scaled images.  Better short
term fix than crashing completely.
Initial attempt at writing unit test for PictureResizeDialog.