Remove debug code. Use the correct FileID() for the datafile path.
Only add files to a directory when they aren't already there. When
updating the denorm table, don't append file entries, overwrite since
the denorm table is supposed to reflect the directory entry.