Unify getRealPath fallback mechanism