Backport security fix a2b111b
Avoids a malicious repository writing to files outside the local storage root
Reported by: "Rebecca N. Palmer" <rebecca_palmer@zoho.com>
Security: https://sourceforge.net/p/flightgear/simgear/ci/a2b111bb09485769d75addf563cb6e44be6655b3/