Creates a safe mode for _import_module, which returns None when the module cannot be found
Fixes assertion errors caused by pickling a decorator function from a module which is not being run as main.
Change _import_module safe default to True, and simplified _locate_function.
Back to safe=False for _import_module
Merge pull request #28 from matsjoyce/decorator_fix

Decorator fix