Improve speed by using os.symlink() rather than ln

Shelling out to ln causes the script to take a hell of a long time, almost
exponentially so when searching something that hits a lot of email.
Non-scientific measurements report between 9x and 11x decrease of running time
when using os.symlink().

Also improved speed by using the slightly optimized defaultdict() for storing
the email digests, and by dropping an extra iteration of the list returned by
notmuch by moving filter exclusion into sha digest loop.

Also did some minor cleanups:
Changed print statement to a function for glorious Python 3 compatibility.
Removed unnecessary use of global.
Removed unused sys import.
Removed redundant first mkdir -p call (the second one will create parent)