Set working directory for OS X

Properly setting the working directory for OS X similar to how NME handles it.