An overnight blaze at a Scots high school is being treated as wilful by investigators.