how to check if a file is a directory or regular file in python?,os.path.isfile('bob.txt')