Prevent race condition of cron jobs

It locks a temp file while cron is executing cron. In case cron completes
or process get terminated unexpectedly lock is opened allowing other crons
to proceed

Fixes #74
Merge pull request #149 from VarunAgw/cron

Prevent race conditions during cron jobs