whitelist.py: Small bug fix and misc changes.