Check if open_basedir is set

The file:// protocol does not work with curl when an open_basedir is set.

This fixes #12016

@bantu @MorrisJobke