結果 : check if path is a directory or file python