Fix JSON::ParseError on save_screenshot failure

When the given image path is a directory or non-writable, it fails to save screenshot and raises JSON::ParseError.

I set an error message on save_screenshot failure to avoid empty string.