Replace md5 library with hashlib.

md5 is deprecated.