git-dangling: Replace all dangling-result.tmp with $dangfile

83316e36-2faf-11e4-a1ad-c80aa9e67bbd
git-dangling: Place $dangfile inside the .git directory

The main problem about keeping this file after running this script was
that it polluted the working copy. By placing it inside the .git
directory it should be OK to keep it.

c1c0e7e6-2fb2-11e4-b1d1-c80aa9e67bbd
git-dangling: Don't delete $dangfile if it's inside the .git dir

As mentioned in the previous commit, storing $dangfile in the .git
directory should be jolly good. But if we're in a bare repo, there's no
.git directory to store it in, so in that case it's still deleted.
Another thing is that "git rev-parse --show-toplevel" doesn't work in
bare repos or inside the .git directory, so it should take care of that
too.

d35ee4b4-2fb5-11e4-b3f4-c80aa9e67bbd
Merge branch 'git-dangling.resurrect_git-dangling-tmp'

* git-dangling.resurrect_git-dangling-tmp:
  git-dangling: Don't delete $dangfile if it's inside the .git dir
  git-dangling: Place $dangfile inside the .git directory
  git-dangling: Replace all dangling-result.tmp with $dangfile

984ad22e-2fb6-11e4-9a6d-c80aa9e67bbd