Rename variable.
Move update code outside the main function.
Tidy up argument parser.
Add option to dump tools version information.
Handle download errors.
Properly update the tools record when a tool could not be downloaded.