That's a racoon. 100% positive. In all honesty I have seen them do this before. This is a last chance defense mechanism for them. You must have caught him by suprise. It's not rabid or it would have not been trying to hide. When treed by dogs they will do this a lot in the tree to try to hide themselves from you lights. Seen it a hundred times if I've seen it once.