Fixed minimatch call error

minimatch() was always returning undefined causing the base string to be incorrectly calculated.