[Compass-ci] [PATCH v5 compass-ci] src/lib/job.cr: optimize the get_pkg_common_dir function