Turns out all that was unnecessary, argv[0] seems to work now?