And there was no /programs0 partition and even if there was, there was nothing in it?

Long before opening the route directory it does chdir("/"), so where the binary lives really doesn't matter. drive0/var/gpsapp/routes is the same as /drive0/var/gpsapp/routes, and both are the same regardless of where you run the binary from. I'm not planning to move my binaries, or my data, for now, but I did make a separate routes directory and populate it with a different set of routes, to demonstrate that it opened the right one. It did. So I added some printf code and ran it by hand on the empeg. It opened *only* the right directory.