don't die on the global/shared db
re-organize the way we get the human repr of an fd

 - renamed rncache to rn_cache,
 - update the pfd in two steps (from filepath, then from pg),
 - added DIR file type (not that it does anything),
 - added debug function to print out rn_cache and pfd_cache.