This is supposed to create a file in my project directory called \"tuna.txt\". When I run it, it compiles successfully, however no file is created. I am on a mac using xcode
I assure you that barring errors (which you're not checking for) a file is created. Xcode has a tendency to use the final build-dir as the current working directory when running from the IDE. you can change this by editing the active Scheme.
Note: This is also where you will setup any command line arguments (those are on the Arguments tab, not the Options tab), should you desire to do so.