Change directory when execute command
Detect '.git' file (for separated git-dir e.g. submodule)
fixed current_branch()