Change hash to use relative path for name

This avoids the issue of creating a different hash when the root
directory has changed.