added test to ensure master respects pattern

Improved tests to make sure that a master template isn’t applied to
files not matching the given pattern.