More mariadb work; performs checks to see if file exists locally

have checks in place to perform queries to see if file exists locally
and will update db if the file no longer exists and marks that record
as having been deleted.