type determines the type of a file or directory. Prints "file", "directory" or "does not exist".