Robust construction of file_path.