sha1_file: link() returns -1 on failure, not errno