pcx: Return an error on broken palette if err_detect is set to 'explode'

Signed-off-by: Martin Storsjö <martin@martin.st>