Refactoring
Fix bug staging hunk bug

Staging hunk command does not work files which are in not top directory of
repository. And add test of hunk command utility function.