Made the script more resistant to breakage

Does no longer require the labels layer to contain both black and yellow
pixels, and produces a clear error message if it's a layer group.