Added MAX_RETRIES parameter.

When CHECKIN_WINDOW=0, the program gives up too early. Fixed this by adding a
MAX_RETRIES parameter instead.
Merge pull request #22 from redstreet/retry_issue

Added MAX_RETRIES parameter.