Improve detection of proc filesystem that works despite potential open_basedir settings