Merge "Reconcile directory and file paths correctly in sql query for scan"