Improved error message in case we cannot pickle the return value.
Fixed bug in pickle extension for modules.