Use absolute paths in is_dir() checks to prevent open_basedir related warnings