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 
Is this really intended? I guess not, because this breaks the autosetup (even in the unit tests)