Fix calculate_2mo_avg (#9889).
Include another check based on first_seen (#9889).

We only checked uptime fraction, but that may be >= 95% regardless of
overall uptime.  Let's only consider relays that have been around for
the past two months.
Fix typo (#9889).
Added command-line-argument feature and cleared some indentation errors(#9889).
Also implemented the recommended way of checking for keys in dictionaries.