Backport security fix 280cd52
Without this fix, a malicious aircraft maintainer can easily overwrite
arbitrary files the user running FlightGear has write access to.
Reported by: Florent Rougon <f.rougon@free.fr>
Security: https://sourceforge.net/p/flightgear/flightgear/ci/280cd523686fbdb175d50417266d2487a8ce67d2/