A decorated tree approach to random permutations in substitution-closed classes