Add a function to insert file's metadata into files table.
If a file does not exist in the database insert it.