added better checks and locking on SQLite database due to multiple programs hitting it at once
added better checks and locking on SQLite database due to multiple programs hitting it at once

LyonsLab/coge,asherkhb/coge,asherkhb/coge,asherkhb/coge,LyonsLab/coge,LyonsLab/coge,asherkhb/coge,LyonsLab/coge,asherkhb/coge,LyonsLab/coge,LyonsLab/coge,asherkhb/coge,LyonsLab/coge,asherkhb/coge,asherkhb/coge,LyonsLab/coge,LyonsLab/coge,asherkhb/coge