Added the correct permission flags to the open system call and added a pretty print to the file_tree