Fix staged view when file called "HEAD" exists

Staged view could not show staged files correctly when a file called "HEAD" exists in git root directory.