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