Avoid negative file offset in truncate_hint(), add pid # to temp dir