retry flag added and daemon update.

This is a squash of a couple of commits ported from the inferno hg repo.
Merge pull request #11 from pooya/develop

retry flag added and daemon update.