Resolve the bug in plugin tools

1. ${TARGET_ROOT} maybe undefined sometimes.
2. The tools used for modify game projects not well worked sometimes.