Fix cwd change issue of grunt log.