get the hash of a file at a given path