Your comments

I've tried googling this "BareBones API", didn't find anything interesting. What is this and how does it work? 

@Robert Stehwien: I'm trying to get this to work on mac (doing something similar to your code), but the command line arguments from unity are just not coming through. All I get is something like "-psn_0_6358544". The number changes when I click on an other file in unity.