Improve error reporting in osdutil refinement classes, and fix a build issue
in the python wrapping code.