Added data mask for leaves matching

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>
Extended the plugin resource (from file) utilities

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>