Fix bug #4269 and avoid crash with gzipped file
Call gunzip with quoted filenames as they may contain spaces or
other special characters.
In computing the length of the extension, the code does not account
for the prefix "unzipped_", which is added when the zipped filename
does not have one of the extensions "gz", "z", "Z", or "svgz", and
thus the used index is out of bounds. See also this thread:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg207360.html
(cherry picked from commit
69726b832b4ed1859d5c9e753c4437c98f5f2966)
(cherry picked from commit
7296e0e6ba8bcd343fb3cdb78c8590fd0864d469)