Practice: Read a path and check if given path is a file or a directory