Programs that use data stuff have often problems when executed from another directory or from a graphical filemanager. This problems are more common in Linux/*BSD because of both: everyone uses the terminal, and graphical filemanagers have this strange behavior of launching executables from the home directory.
Curdir implements a couple of technics in C++ (one using the argv argument, the other Linux's proc) to workaround it (can be easily ported to C). A bash script that implements the first technic is also shipped. Both technics are explained in the README.