builder: handle cases where onbuild is not uppercase.

closes #8675 

/cc @tiborvass 
`deleteImages(name, name2)`