fix missing arg to fprintf in to-realpaths
cmd_to_realpaths: fix cwd-related bug

  * DB_getkcdbiofile() now returns an absolute path to the database in
    order to make it compatible with cmd_to_realpaths: Since the cwd of
    the process changes, libkcdb would not find the database file
    anymore
  * cmd_to_realpaths: fix a function swap: basename()->dirname(). ROFL.