Fix logic
Fix logic - keep tmp_data if it already exists
Rewrite testSGP(4) to fit current use cases and run quickly
Merge pull request #697 from adamvi/master

Fix sgp.sqlite logic in analyzeSGP and update testSGP(4) to current use cases