Erase any GPS tags before adding new ones

This prevents duplicate GPS tags in the final file, which could
happen if the same tags already existed in the original file.
Correlation would normally abort with a "GPS Already Present"
error were a file already geotagged, but since only the presence
of the GPSLatitude tag is checked, others might still exist
undetected.
Removed remnant of previous refactoring
Calculate rational denominator for elevation based on sigfigs

This is the same way as is done for the seconds part of the
latitude and longitude coordinates, and better preserves the
significant figures as read from the GPX file.
Round the seconds value instead of truncating it

Also, use the more portable pow() instead of powl()
Change portable_timegm to be more portable

Reusing getenv pointers was a problem under FreeBSD.
Don't segfault if the GTK user config directory doesn't exist