Workaround for curl follow redirect + open base dir restrictions