Added mkdir and check file exists function to file object.