Allow to pass procs to with_ / without_

This allows for more complex checks on the resources content. E.g.  to
make sure the generated content doesn't contain string representations
of 'undef' or 'nil' or validates correctly against an XML schema.
Fix up the formatting of the Proc error message