throw exception on invalid skin

before the skin could be loaded even if it contained some invalid data
which could make some random errors that weren't easy to debug