build: ensure PKG_INFO_DIR exists before trying to use it