SetDisplay is a command line utility to set the display resolution and mirroring options on Mac OS X