Dump a program to a file on OS X