if all else fails, use repr(obj) in qualname
Added tests and fixes for signatures.mask.