Added md5hash helper function.
Added getEnvIfBlank helper function.
Replaced flag package with getopt.

The getopt package is more GNU-like, and provides short and long
forms for each flag.
Added comments to explain each logical section in main().