Updated random password generator to stop using deprecated Python libraries.