North Yorkshire arsonist who broke into a man’s home and deliberately set fire to the empty flat has narrowly avoided prison.