fixed cardinality problem occurring when opening record in editor
clear lock before record is stored - trying to determine if some records disappear when stored because they are locked. if record is not stored, it is kept in temp.
Merge pull request #12 from jensopetersen/master

fixed cardinality problem and unlocking files before they are overwritten