Package.compress_package: correctly use relative path

Fixes #7102.