[SPARK-3985] [Examples] fix file path using os.path.join

Consistency is good too. Leave it unless someone else thinks it should change.