Fix handling of leading slashes for hardlinks