Fixing a couple of bugs in sniffer

Fixing broken import; adding exception handling for when getpass is not able to find the current user (might happen in some systems, according to their docs).