[Core] Check if a pkgconfig dir exists before listing files in it.

Prevents an exception logged to my console every time I start up.