Fix up minor things with import hook
Enable import hook by default
Fix bug in exception handling for which(). Also standardize exceptions

to always be ValueError. Add the beginnings of to_dict()
Add from_dict
Fix handling of empty path '' in load_module