Optimize file path handling.