agent: use --pidfile when running from cron (fixes #38)
Merge pull request #40 from DavidS/master

the --pidfile as discussed in #38