Fix Java6 problem that File has no method toPath