Fix bug: prevent removing and recreating scm dir everytime while .git dir exists

before fetch code from git, execute cd dir first to ensure is in the right dir when determine 'tmp/scm/.git' if exist.