Use real path while checking for mounted directories.