File and Directory handling in pythong