Save errno and pass it along to make sure gettext does not change it

https://bugzilla.gnome.org/show_bug.cgi?id=725514