get_file_type() should use stat(), not lstat()