Filesystem started

Started work on filesystem code, wrote basic write_file function.