Clean up resolve_file_in_path to use locals and new IFS strategy.