put mode logic and filename reporting into resource so everybody can benefit

Just noticed that this whole mode conversion logic already existed in resource,
so we should reuse it (I also expanded it a little).
I also made all must_have report the path if the method exists so it's easy to track back what exactly failed.

@calavera