Update whats_HUP.py

Added code to account for the edge case where my custom SIGHUP handler was being called twice when I was closing the controlling terminal.