Search pkg/ and sv/builtin.sv first relative from binary position, then generic paths /usr/lib/surelog and /usr/local/lib/surelog.
Search pkg/ and sv/builtin.sv first relative from binary position, then generic
paths /usr/lib/surelog and /usr/local/lib/surelog.

For that, make an effort to determine the path of the currently running program
and canonicalize its path with realpath().
Use the same search-path for the pkg/ and sv/ directories.

Signed-off-by: Henner Zeller <259ad50fabbfd39355f36ecd6c0afca541ea66ef@acm.org>

alainmarcel/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,chipsalliance/Surelog,chipsalliance/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,alainmarcel/Surelog