Fixed regex for matching flat files.  Fixed db insert/delete for copied files.