Force using relative paths in .git files to stabilize package fingerprints

Up to Git version 1.7.9, the value of `gitdir` in the .git file of submodules is an absolute path. This makes the fingerprint of some packages unstable. The fingerprint of packages which have submodules in their `src` files(e.g. dea_next,  daylimit in cf-release) depend on the location where the release repository is cloned. `bosh create release` generates a new version of the packages even when the source files of them have no changes.

This commit adds a method to rewrite the value of `gitdir` from a absolute path to a relative path before calculating fingerprints. Since Git 1.7.10 uses relative paths for `gitdir` by default, this change is compatible with the newer Git versions.

This PR is just a proposal and I think we can choose other way to stabilize fingerprints, such as simply ignoring .git files.