Python Check If Path Is A Directory