tar.py: Make link target renaming work between base-dirs
Description
This MR fixes link target renaming in tar sources when base-dir is set and the link targets point to something that used to be in a directory that isn't there anymore. It also adds checks to ensure we're extracting tarfiles safely, since the fix would enhance an issue by which we could read the user's files in the sandbox (an issue for reproducibility, but also potentially security).
Changes proposed in this merge request:
- Allow hardlinks to hang between directories without garbling their path
- Fix potential security vulnerabilities around extracting tarfiles
This merge request, when approved, will close: #1052 (closed)