As others have said, probably just the snake not used to being handled. Also on a side note, being overheated as a snake can do much more damage than being too cool. Neither is good for them but I have heard many more stories of neurological problems from snakes that got overheated than from snakes that were kept cooler than normal. But again, if the snake doesn't do the twisting and stuff when in the cage and only does it during handling, its probably just insecure about being held.