Improve the pkgconfig generation logic

The destination directory may not exist, so we need to mkdir just
in case.
1 file changed