Add saving the screenshots to disk.

The pixel data read operation is done in the main thread's call chain,
but the compressing/saving the image data to disk is done in a
separate thread.