Find template in the order expected.

@ricardoquesada , @minggo 
Please review this PR. It's for the purpose of finding template in expected order.

This is the user case example:
1. The value of `cocos.get_templates_paths()` is `[
    "Directory1",
    "Directory2"
]`
2. There are `cpp-template-default` folder in both `Directory1` & `Directory2`.
3. When running command `cocos new -l cpp MyGame`, users expected using the template `Directory1/cpp-template-default`. (In the order of `cocos.get_templates_paths()`)

But `Directory2/cpp-template-default` is found with the logic before this PR.
I think it's a bug. So I send this PR to solve the problem.