It didn't take me long to find the geo-* tools, which are a set of shell scripts to download various interesting information from the geocaching.com website -- such as the list of caches that are nearest to your home coordinates, or the ones you found, etcetera.
However, the script to download the GPX-file for a certain waypoint/cache was broken. Recently, gc.com changed their page layout, which also prompted some changes in the form on that page. The script, such as it was, didn't send the right information along, so you got the HTML page in your GPX-file...
After a bit of hacking (livehttpheaders to the rescue!), I determined the right way to do the request, and changed the call to curl. Now it works.
I have submitted my change (really a minor edit) to the package author, so that others may continue to benefit from these scripts.