Rewrite handling of platform-specific paths